﻿<%@ Page Language="C#" CodeFile="Search.aspx.cs" Inherits="Search" MasterPageFile="~/MasterPages/SearchMaster.master"
    AutoEventWireup="true" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/Javascripts/Gammar.Price.PagerControl.js" />
            <asp:ScriptReference Path="~/Javascripts/Longbow.UI.HyperlinkBehavior.js" />
            <asp:ScriptReference Path="~/Javascripts/GlobalSearch.js" />
        </Scripts>
    </asp:ScriptManagerProxy>
    <div id="tPager" class="pages">
    </div>
    <div id="sc" class="sc2">
        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="ObjectDataSource1">
            <ItemTemplate>
                <table class="w100" dc="<%# DataBinder.Eval (Container.DataItem, "ItemCount") %>">
                    <tr>
                        <td class="tc">
                            <a href="TLP/Default.aspx?id=<%# DataBinder.Eval (Container.DataItem, "Oc_id") %>&cid=<%# DataBinder.Eval (Container.DataItem, "CategoryId")%>"
                                target="_blank"><%# DataBinder.Eval (Container.DataItem, "Title") %></a><br />
                            <br />
                            培训机构：<%#DataBinder.Eval(Container.DataItem, "Presideunit")%><br />
                            <br />
                            内容简介：<%# Gammar.Price.Utility.StringUtility.Trim((string)DataBinder.Eval(Container.DataItem, "Introduction"), 120)%>
                            <br />
                            <br />
                            培训类别：<a class="ca" target="_blank" href="SLP/Default.aspx?id=<%# DataBinder.Eval(Container.DataItem, "CategoryId")%>"><%# DataBinder.Eval(Container.DataItem, "CategoryName")%></a>
                        </td>
                        <td width="10px"></td>
                        <td class="bm">
                            &nbsp;<%# (int)DataBinder.Eval(Container.DataItem, "Counter") > 1 ? "最低" : "" %>价格<br />
                            <br />
                            <font color="green"><b><%#DataBinder.Eval(Container.DataItem, "Price")%></b></font>
                        </td>
                        <td class="bp">
                            <input type="button" class="q" value='<%# (int)DataBinder.Eval(Container.DataItem, "Counter") > 1 ? "比较价格" : "产品详细" %>'
                                onclick="goDetail('<%# DataBinder.Eval (Container.DataItem, "Oc_id") %>', <%# DataBinder.Eval (Container.DataItem, "Counter") %>);" />
                            <br />
                            <br />
                            <%# (int)DataBinder.Eval(Container.DataItem, "Counter") > 1 ? string.Format(System.Globalization.CultureInfo.InvariantCulture, "共 {0} 商家", DataBinder.Eval(Container.DataItem, "Counter")) : string.Format(System.Globalization.CultureInfo.InvariantCulture, "来自：{0}", DataBinder.Eval(Container.DataItem, "Srcweb")) %>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
            <SeparatorTemplate>
                <hr />
            </SeparatorTemplate>
        </asp:Repeater>
    </div>
    <div id="bPager" class="pages">
    </div>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="RetrieveSearchItem"
        TypeName="Gammar.Price.Business.SearchLogic" OldValuesParameterFormatString="original_{0}"
        CacheDuration="2000" EnableCaching="True">
        <SelectParameters>
            <asp:QueryStringParameter Name="keyWord" QueryStringField="q" Type="String" />
            <asp:QueryStringParameter Name="pageIndex" QueryStringField="pid" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
